package com.tuanzi.loan.web.lazy.family.sms;

import com.tuanzi.loan.business.service.sms.SmsVoiceSendTaskService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.SmsSendTaskSearchRequest;
import com.tuanzi.loan.vo.request.family.sms.SmsVoiceSendTaskSearchRequest;
import com.tuanzi.loan.vo.response.family.SmsSendTaskSearchResponse;
import com.tuanzi.loan.vo.response.family.sms.SmsVoiceSendTaskSearchResponse;
import org.springframework.data.domain.Page;

/**
 * @Author: chenweijun
 * @Date: 2018/10/22 19:48
 * @Description:
 */
public class SmsVoiceSendTaskLazyDataModel extends BaseLazyDataModel<SmsVoiceSendTaskSearchRequest, SmsVoiceSendTaskSearchResponse> {

    private SmsVoiceSendTaskService smsVoiceSendTaskService = SpringContextHolder.getBean(SmsVoiceSendTaskService.class);

    public SmsVoiceSendTaskLazyDataModel(SmsVoiceSendTaskSearchRequest searchRequest) {
        super(searchRequest);
    }

    @Override
    protected Page<SmsVoiceSendTaskSearchResponse> doLoad(PageSearcher<SmsVoiceSendTaskSearchRequest> pageSearcher) {
        return smsVoiceSendTaskService.list(pageSearcher);
    }
}
